#ifndef OPERATE_FILE_H
#define OPERATE_FILE_H

#include "config.h"
#include "queue.h"
#include "stack.h"

#define MAX_SUFFIX 50
#define MAX_FILEPATH 300

int get_file_prefix(char *filename, char *prefix);
int get_filename_without_path(const char* path, char *filename);
int has_file_extension(const char *filename);
int get_file_suffix(const char *filename, char *suffix) ;
int is_cfile(const char *filename);
int is_dir(char *path);
int is_file_empty(const char *filename);
void list_files(const char *path, const char* dest_dir, Queue *q);
void cost_time(struct timeval *start, struct timeval *end);
int get_path(char* path);
int get_parent_directory(char* current_path);
int is_directory_empty(const char *path);
void find_empty_folder(char *path, Stack *s);
void delete_empty_folder(char *path);

#endif